package org.apache.solr.update.processor;

import org.apache.solr.common.util.Hash;

public class Lookup3Signature extends Signature {

    protected long hash;

    public Lookup3Signature() {
    }

    @Override
    public void add(String content) {
        hash = Hash.lookup3ycs64(content, 0, content.length(), hash);
    }

    @Override
    public byte[] getSignature() {
        return new byte[]{(byte) (hash >> 56), (byte) (hash >> 48), (byte) (hash >> 40), (byte) (hash >> 32), (byte) (hash >> 24), (byte) (hash >> 16), (byte) (hash >> 8), (byte) (hash)};
    }
}